<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    body{
      margin: 0;
      padding: 0;
      background-image: url(../images/grid.png);
    }
    .box{
      width: 200px;
      height: 200px;
      background-color: red;
      margin: 200px;
      position: relative;
      transform: rotateX(-33.5deg) rotateY(45deg);
      transform-style: preserve-3d;
    }
    .common{
      width: 100%;
      height: 100%;
      position: absolute;
      top: 0px;
      left: 0px;
      opacity: 50%;
      /* 使背面不可见！ */
      backface-visibility: hidden;
    }
    .front{
      background-color: pink;
      transform: translateZ(100px);
    }
    .back{
      background-color: greenyellow;
      /* rotateY 的目的是让正面朝外 */
      transform: translateZ(-100px) rotateY(180deg); 
    }
    .top{
      background-color: darkgoldenrod;
      transform: rotateX(90deg) translateZ(100px);
    }
    .bottom{
      background-color: palevioletred;
      transform: rotateX(-90deg) translateZ(100px);
    }
    .left{
      background-color: purple;
      transform: rotateY(-90deg) translateZ(100px);
    }
    .right{
      background-color: blue;
      transform: rotateY(90deg) translateZ(100px);
    }
  </style>
</head>
<body>
  
  <div class="box">
    div
    <div class="front common">1前</div>
    <div class="back common">2后</div>
    <div class="top common">3上</div>
    <div class="bottom common">4下</div>
    <div class="left common">5左</div>
    <div class="right common">6右</div>
  </div>
</body>
</html>